package com.qm.console.pubdef.dto.analysis;

import lombok.Getter;
import lombok.Setter;

import java.util.Calendar;

@Getter
@Setter
public class onlineQueryDTO extends ChannelQueryDTO {
    private String tableName;

    private String interval;

    private Integer identifyType;

    private String nickname;

    private Integer userId;

    public String getTableName() {
        Calendar calendar = Calendar.getInstance();
        if(calendar.get(Calendar.MONTH) >= 9){
            return String.format("immsg_%s_%s", calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH) + 1);
        }else {
            return String.format("immsg_%s_0%s", calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH) + 1);
        }
    }

}
